<template>
  <div
    class="chat-container"
    style="
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 420px;
      margin: 0 auto;
    "
  >
    <div class="container-head flex" style="background: #09d0ce">
      <div style="-webkit-app-region: drag; color: #ffffff">在线客服</div>
      <div style="flex: 1; height: 46px; -webkit-app-region: drag"></div>
      <div class="head-right flex">
        <div class="user-info flex">
          <div class="window-close" style="cursor: pointer;" @click="winClose"></div>
        </div>
      </div>
    </div>
    <iframe class="online-iframe" src="https://www.baidu.com" sandbox='allow-scripts allow-same-origin '></iframe>
  </div>
</template>

<script>
const {remote} = require('electron')
export default {
  name: "online",
  data() {
    return {
    };
  },
  methods: {
    winClose() {
        remote.getCurrentWindow().close()
    }
  },
  mounted() {
    // window.open("https://www.baidu.com","_bank","nodeIntegration=no")
  }
};
</script>

<style>
.online-iframe{
    flex: 1;
    border: 0;
}
</style>